package com.itheima.genericinterface;

public class GenericityInterface1 {
    public static void main(String[] args) {
        InterImplA<String> stringInterImplA = new InterImplA<>();
        InterImplB interImplB = new InterImplB();

    }
}
//定义泛型接口
interface Inter<T>{
    public abstract void method(T t);
}
//方式1:接口实现类延续借口的泛型,实现类变成泛型类
class InterImplA<T> implements Inter<T>{
    @Override
    public  void method(T t){

    }
}
//方式2:接口实现泛型接口的同时给定泛型的数据类型,实现类就变成了普通类
class InterImplB implements Inter<String>{
    @Override
    public void method(String s) {

    }
}